package cn.edu.hzvtc.service;

import cn.edu.hzvtc.pojo.Msg;
import cn.edu.hzvtc.pojo.MsgAnswer;
import cn.edu.hzvtc.pojo.MsgCount;
import cn.edu.hzvtc.pojo.UnitType;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

@Service
public interface msgService {
    //根据登录用户id查询用户发送消息
    List<Msg> getSendMsgByUserId(Integer userId);

    //删除发送消息
    Boolean deleteMsg(Integer deleteId);

    //添加消息
    Integer addMsg(Msg msg, Set<Integer> receiveUserId);

    //获取未读消息提示
    Integer getCountByUserId(Integer userId,Integer msgState);

    //获取所有接收消息
    List<MsgAnswer> getReceiveMsgByUserId(Integer userId);

    Integer updateMsgAnswer(MsgAnswer msgAnswer);


    Msg getMsgById(Integer id);

    List<MsgCount> getReceiveMsgCountsById(Integer id);

    List<MsgCount> getAllCountsByUserId(Integer userId);

    List<MsgCount> getDoneCountsByUserId(Integer userId);

    List<MsgCount> getAllCountsByAreaId(Integer areaId);

    List<MsgCount> getDoneCountsByAreaId(Integer areaId);
}
